<?php
require_once "../class/fenajax.class.php";
include "../dyn/connexion.php";

$f = new fenAjax("Formulaire cadavre",0);

if(isset($_POST['mode']) and isset($_POST['id_cadavre']))
{
	$mode = $_POST['mode'];
	$id_cadavre = $_POST['id_cadavre'];
	
	
	if( !in_array($mode,array(3)))
		$f->ajaxErreur("Fonction non supportée","Ce mode n'est pas supporté pour ce module");
	
	if($mode == 3){		$header = "Comfirmer la suppression"; 		$nomAction = "Supprimer";	$disable = ""; }
	
	$f->retourAjax["boutton"] = $nomAction;
	$f->retourAjax["header"] = $header;
	
	
	$form = "<div id=\"feedback\"></div><br />";
	
	if ($mode == 3) {
		$form .= "<div class=\"center\">";
		$form .= BMInfo("Note: La supression d'un cadavre exquis est définitive");
		$form .= "</div>";
	}
			
	$form .= "<form action=\"#\" method=\"post\" onSubmit=\"return actionCadavre($(this));\">";
	
	if ($mode == 3) {
		$form .= "<input type=\"hidden\" name=\"id_cadavre\" value=\"".$id_cadavre."\" />
		";
	}
	
	
	$form .= "<input type=\"hidden\" name=\"mode\" value=\"".$mode."\" />
	</form>";
	
	$f->retourAjax["erreur"] = false;
	$f->retourAjax["msg"] = $form;
}

$f->endAjax();
?>